babl-cache: use clearer arithmetic for dropping 1% of cached fishes
authorØyvind Kolås <pippin@gimp.org>
Wed, 23 Nov 2016 19:45:43 +0000 (20:45 +0100)
committerØyvind Kolås <pippin@gimp.org>
Wed, 23 Nov 2016 19:45:43 +0000 (20:45 +0100)
babl/babl-cache.c

index 8d5ed618cf3de25b9895c535eb6f6a9a57948c07..005fda20b68382e39a81dd25e0eecc907f43f58f 100644 (file)
@@ -237,8 +237,7 @@ void babl_init_db (void)
         case '-': /* finalize */
           if (babl)
           {
-            if ( ((babl->fish.pixels+1 + babl->fish.processings) % 
-                  ((tim % 100)+1)) == 0)
+            if (((babl->fish.pixels + babl->fish.processings) % 100) == (tim % 100))
             {
               /* 1% chance of individual cached conversions being dropped -
                * making sure mis-measured conversions do not